package org.jeecg.modules.rental.enums;

import org.jeecg.common.enums.IEnumDict;
import org.jeecg.common.exception.JeecgBootException;

/**
 * @Description: 租车订单状态
 * @author sean
 * @date 2019/12/3
 */
public enum EBikeOrderStatusEnums implements IEnumDict<EBikeOrderStatusEnums> {


    UNPAID("1", "未支付"),

    PAID("2", "已支付"),

    CANCELLED("3", "已取消");

    private String value;

    private String label;

    EBikeOrderStatusEnums(String value, String label) {
        this.value = value;
        this.label = label;
    }

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public String getKey() {
        return value;
    }

    @Override
    public String getRemark() {
        return null;
    }

    public static EBikeOrderStatusEnums getEnumByValue(String value){
        for(EBikeOrderStatusEnums item: values()){
            if(value.equals(item.value)){
                return item;
            }
        }
        throw new JeecgBootException("没找到对应字典");
    }

}
